//
//  WAMemberCenterController.m
//  WalkiOS
//
//  Created by luqiuan on 2019/10/24.
//  Copyright © 2019 Chenmuzhou. All rights reserved.
//

#import "WAMemberCenterController.h"
#import "WAMemberCenterCell.h"
#import "WAVipModel.h"

@interface WAMemberCenterController ()
@property (weak, nonatomic) IBOutlet UITableView *tableView;

@property (nonatomic, strong) NSArray *dataSources;
@end

@implementation WAMemberCenterController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.tableView registerNib:[UINib nibWithNibName:@"WAMemberCenterCell" bundle:nil] forCellReuseIdentifier:@"WAMemberCenterCell"];
    self.dataSources = [WAVipModel getVipList];
    [self.tableView reloadData];
}

#pragma mark - UITableView Delegate
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    WAMemberCenterCell *cell = [tableView dequeueReusableCellWithIdentifier:@"WAMemberCenterCell"];
    WAVipModel *model = self.dataSources[indexPath.row];
    cell.memberRankLB.text = model.sort;
    cell.detailLB.text = model.yuluValue;
    cell.rightLB.text = model.serviceCharge;
    return cell;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return self.dataSources.count;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 90;
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
//    WATransactionDetailController *VC = [WATransactionDetailController new];
//    [self.navigationController pushViewController:VC animated:YES];
}
- (IBAction)backAction:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
}

@end
